#!/usr/bin/python

import sys
from scapy import *
conf.verb = 0

if len(sys.argv) != 7:
	print "Usage: pngem <source> <target> <port> <srcem> <dstem> <msg>"
	sys.exit(1)

source = sys.argv[1]
target = sys.argv[2]
port = sys.argv[3]
srcem = sys.argv[4]
dstem = sys.argv[5]
msg = sys.argv[6]
msg = "000" + "SRC=" + srcem + ",DST=" + dstem + "000" + msg

packetip = IP(dst = target)/ TCP (dport = int(port), flags = "S")/msg
packeticmp = IP(dst = target, src = source)/ICMP()/msg

#ls(packeticmp)
#sendp(packetip)

response = sr1(packeticmp)
